<%#
# To change this template, choose Tools | Templates
# and open the template in the editor.
%>

<center><h2>กระดานข่าว</h2></center>
<div class="nav">
<%= link_to image_tag('/images/post-button.gif', :border => 0, :title => 'ตั้งคำถาม', :align => 'absmiddle'), {:action => 'new_topic', :id => @forum} %> &nbsp;&nbsp;&nbsp;<%= link_to 'Forum', {:action => 'forum_list'} %> -> <%= link_to @forum.forum_name, {:action => 'view_forum', :id => @forum} %>
</div>
<br>
<table align="center" class="topic">
  <tr>
    <th>ผู้ตอบ</th><th>ข้อความ</th>
  </tr>
  <tr id="show_topic">
    <td>กระทู้ :</td><td><%= @topic.topic_name %></td>
  </tr>
  <% @answers.each do |answer| %>
    <tr>
      <td><font size="-2"><%= answer.create_by || "anonymous" %><br><%= answer.create_on.strftime("%d/%m/%Y %I:%M%p") %></font></td>
      <td><%= answer.answer_text %></td>
    </tr>
  <% end %>
</table>
